package com.ruoyi.web.controller.system;

import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.SysStudent;
import com.ruoyi.system.service.ISysStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ruoyi.common.core.controller.BaseController;
import java.util.List;

@RestController
@RequestMapping("/system/student")
public class SysStudentController extends BaseController{

    @Autowired
    private ISysStudentService sysStudentService;

    //获取学生列表,返回给前端
    @RequestMapping("/list")
    public TableDataInfo list(SysRole role){
        startPage();
        List<SysStudent> sysStudents = sysStudentService.list(role);
        return getDataTable(sysStudents);
    }

}
